package com.clqteam.serviceimpl;

import java.util.List;

import com.clqteam.dao.showShNameDao;
import com.clqteam.daoimpl.showShNameDaoImpl;
import com.clqteam.model.Role;
import com.clqteam.model.Supplier;
import com.clqteam.service.showShNameService;

public class showShNameServiceImpl implements showShNameService{
	showShNameDao sh = new showShNameDaoImpl();

	@Override
	public List<Supplier> findrNameByEmployee() {
		
		return sh.getrNameByEmployee();
	}

	@Override
	public int swichsIdByrName(String rName) {
		int i=0;
		 List<Supplier> role=sh.getrNameByEmployee();
		 for (Supplier ro : role) {
			 if(rName.equals(ro.getSupName())){
				 i=ro.getSupId();
			 }
		}
		return i;
}
}